package com.shenmazong.servereduresume.controller;

import com.shenmazong.servereduresume.dto.TbSrwp;
import com.shenmazong.servereduresume.service.TbSrwpService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import com.shenmazong.vo.ListParamVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 阿瑞
 * @version 1.0
 * @description TODO
 * @class TbSrwpController ???
 * @date 2021/9/18 8:18
 */
@RestController
@RequestMapping("srwp")
public class TbSrwpController {
    @Autowired
    private TbSrwpService tbSrwpService;
    /**
     * @description 管理员查看简历
     * @params [listParamVo]
     * @return com.shenmazong.utils.ResultResponse
     * @author 阿瑞
     * @date 2021/9/18 10:24
     */
    @PostMapping("findAllSrwpAdmin")
    public ResultResponse findAllSrwpAdmin(@RequestBody ListParamVo listParamVo){
        return tbSrwpService.findAllSrwpAdmin(listParamVo);
    }
    /**
     * @description 学生查看简历
     * @params [listParamVo]
     * @return com.shenmazong.utils.ResultResponse
     * @author 阿瑞
     * @date 2021/9/18 10:24
     */
    @PostMapping("findAllSrwpStudent")
    public ResultResponse findAllSrwpStudent(@RequestBody ListParamVo listParamVo){
        return tbSrwpService.findAllSrwpStudent(listParamVo);
    }
    /**
     * @description 添加简历模板
     * @params [tbSrwp]
     * @return com.shenmazong.utils.ResultResponse
     * @author 阿瑞
     * @date 2021/9/18 10:24
     */
    @PostMapping("saveSrwp")
    public ResultResponse saveSrwp(@RequestBody TbSrwp tbSrwp){
        return tbSrwpService.saveSrwp(tbSrwp);
    }
    /**
     * @description 修改简历模板
     * @params [tbSrwp]
     * @return com.shenmazong.utils.ResultResponse
     * @author 阿瑞
     * @date 2021/9/18 10:24
     */
    @PostMapping("updateSrwp")
    public ResultResponse updateSrwp(@RequestBody TbSrwp tbSrwp){
        return tbSrwpService.updateSrwp(tbSrwp);
    }
    /**
     * @description 删除简历模板
     * @params [batchChooseIdVo]
     * @return com.shenmazong.utils.ResultResponse
     * @author 阿瑞
     * @date 2021/9/18 10:24
     */
    @PostMapping("deleteSrwp")
    public ResultResponse deleteSrwp(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbSrwpService.deleteSrwp(batchChooseIdVo);
    }
    /**
     * @description 管理员审核模板
     * @params [batchChooseIdVo]
     * @return com.shenmazong.utils.ResultResponse
     * @author 阿瑞
     * @date 2021/9/18 10:24
     */
    @PostMapping("auditSrwp")
    public ResultResponse auditSrwp(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbSrwpService.auditSrwp(batchChooseIdVo);
    }
}
